<%@ Page Language="C#" MasterPageFile="~/master/public-regular.master" AutoEventWireup="true"
    CodeFile="edit-profile.aspx.cs" Inherits="myaccount_edit_profile" %>

<%@ Register Namespace="ECommerce.Library.Web" TagPrefix="ucc" %>
<%@ Register Src="~/controls/wucValidator.ascx" TagName="Validator" TagPrefix="wuc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderNestedHeader"
    runat="Server">
    <link href="<%= SiteGlobals.BaseUrl %>App_Style/css/admin.css" rel="stylesheet" type="text/css" />
    <script src="<%= SiteGlobals.BaseUrl %>javascript/jquery.min.js" type="text/javascript"></script>
    <script src="<%= SiteGlobals.BaseUrl %>javascript/jquery.ui.core.js" type="text/javascript"></script>
    <script src="../javascript/datetime/jquery.ui.datepicker.js" type="text/javascript"></script>
    <link href="../javascript/datetime/jquery-ui-1.8.8.custom.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="cntContent" ContentPlaceHolderID="cphMiddleContent" runat="Server">
    <div class="regular-pages" >
        <ucc:ResponseMessage ID="uccResponseMessage" runat="server"></ucc:ResponseMessage>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
            ValidationGroup="vGroup" DisplayMode="BulletList" ShowMessageBox="true" HeaderText="Please correct the following:"
            CssClass="adminValidator" ShowSummary="False" />
        <div class="grid_16 alpha">
            <fieldset>
                <legend>Personal Details </legend>
                <label>
                    First Name</label>
                    <br />
                <asp:TextBox ID="tbxPersonalFirstName" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPersonalFirstName" runat="server" ControlToValidate="tbxPersonalFirstName"
                    ErrorMessage="First Name is required" Display="dynamic" SetFocusOnError="true"
                    EnableClientScript="true" ValidationGroup="vGroup">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revFirstName" ControlToValidate="tbxPersonalFirstName"
                    EnableClientScript="true" ErrorMessage="Incorrect Text Format" SetFocusOnError="true"
                    ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$" ValidationGroup="vGroup">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Last Name</label>
                    <br />
                <asp:TextBox ID="tbxPersonalLastName" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPersonalLastName" runat="server" ControlToValidate="tbxPersonalLastName"
                    ErrorMessage="Last Name is required" Display="dynamic" SetFocusOnError="true"
                    EnableClientScript="true" ValidationGroup="vGroup">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revPersonalLastName" ControlToValidate="tbxPersonalLastName"
                    EnableClientScript="true" ValidationGroup="vGroup" ErrorMessage="Incorrect Name Format"
                    SetFocusOnError="true" ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Date of Birth
                </label>
            <br />
                <asp:TextBox ID="tbxPersonalDateOfBirth" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPersonalDateOfBirth" runat="server" ControlToValidate="tbxPersonalDateOfBirth"
                    ErrorMessage="Date of Birth is required" Display="dynamic" SetFocusOnError="true"
                    EnableClientScript="true" ValidationGroup="vGroup">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revPersonalDateOfBirth" ControlToValidate="tbxPersonalDateOfBirth"
                    EnableClientScript="true" ValidationGroup="vGroup" ErrorMessage="Incorrect Date of Birth Format"
                    SetFocusOnError="true" ValidationExpression="^(0[1-9]|1[0-2])/(0[1-9]|[1-2][0-9]|3[01])/([1-9][0-9][0-9][0-9])$">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Email Address</label>
                    <br />
                <asp:TextBox ID="tbxPersonalEmailAddress" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPersonalEmailAddress" runat="server" ControlToValidate="tbxPersonalEmailAddress"
                    ErrorMessage="Email Address is required" Display="dynamic" SetFocusOnError="true"
                    EnableClientScript="true" ValidationGroup="vGroup">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revPersonalEmailAddress" ControlToValidate="tbxPersonalEmailAddress"
                    EnableClientScript="true" ValidationGroup="vGroup" ErrorMessage="Incorrect Email Format"
                    SetFocusOnError="true" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Phone Number</label>
                    <br />
                <asp:TextBox ID="tbxContactPhoneNumber" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvContactPhoneNumber" runat="server" ControlToValidate="tbxContactPhoneNumber"
                    ErrorMessage="Contact Telephone Number is required" Display="dynamic" SetFocusOnError="true"
                    EnableClientScript="true" ValidationGroup="vGroup">
                </asp:RequiredFieldValidator>
                <br />
                <label>
                    Gender</label>
                <asp:RadioButton ID="rbtMale" runat="server" GroupName="rbtGender" Checked="True" />
                <label>
                    Male</label>
                <asp:RadioButton ID="rbtFemale" runat="server" GroupName="rbtGender" />
                <label>
                    Female</label>
                
                    <br />
                <asp:Button ID="imbModify" runat="server" ValidationGroup="vGroup" AlternateText="Modify"
                    CausesValidation="true" OnClick="imbModify_Click" CssClass="button medium green" Text="Modify" />
                <asp:Button ID="imbReset" runat="server" AlternateText="Reset" CssClass="button medium gray"
                    Text="Reset" CausesValidation="false" OnClientClick="javascript:ResetFields();return false;" />
                
            </fieldset>
            <br />
            
        </div>
        
        <br class="clear" />
    </div>
    <script language="javascript" type="text/javascript">
        function ResetFields() {
            $('<%= tbxPersonalFirstName.ClientID %>').value = '';
            $('<%= tbxPersonalLastName.ClientID %>').value = '';
            $('<%= tbxPersonalDateOfBirth.ClientID %>').value = '';
            $('<%= tbxPersonalEmailAddress.ClientID %>').value = '';
            $('<%= tbxContactPhoneNumber.ClientID %>').value = '';
            
        }

      
    </script>
    <script type="text/javascript">
        $(function () {
            $("#<%= tbxPersonalDateOfBirth.ClientID %>").datepicker({
                changeMonth: true,
                changeYear: true
            });
        });
    </script>
</asp:Content>
